package com.starinside.wp.foundation.vo;

import com.starinside.wp.domain.CheckRecord;
import com.starinside.wp.domain.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigInteger;
import java.util.Date;
import java.util.Map;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2017/7/21
 * *******************************
 */
@Data
public class CheckRecordVO {

    private String childrenId;

    private Date checkInTime;

    private String checkInMediaUrl;

    private String checkInStaffId;

    private Date checkOutTime;

    private String checkOutMediaUrl;

    private String checkOutStaffId;

    private Integer checkType;

    private Integer status = 0;

    private Integer healthyStatus = 0;

    private String exceptionName;

    private String sickName;

    private String specialRecord;

    private BigInteger duration = BigInteger.valueOf(0L);

    private String height;

    private String weight;

    private String header;

    private Date created = new Date();

    private Map checkinTeacher;
    private Map checkoutTeacher;

    public  static CheckRecordVO of(CheckRecord record){
        CheckRecordVO vo = new CheckRecordVO();

        BeanUtils.copyProperties(record, vo);


//        vo.setChildrenId(record.getChildrenId());
//        vo.setCheckInTime(record.getCheckInTime());
//        vo.setCheckInMediaUrl(record.getCheckInMediaUrl());
//        vo.setCheckInStaffId(record.getCheckInStaffId());
//        vo.setCheckOutTime(record.getCheckOutTime());
//        vo.setCheckOutMediaUrl(record.getCheckOutMediaUrl());
//        vo.setCheckOutStaffId(record.getCheckOutStaffId());
//        vo.setCheckType(record.getCheckType());
//        vo.setStatus(record.getStatus());
//        vo.

        return vo;
    }
}
